<?php
/**
 * User: hda
 * Date: 2017/4/24
 * Time: 12:16
 * Progress: 0%
 */

namespace app\index\controller;


use icontroller\admin\AController;
use icontroller\admin\index\IAdminPower;
use logic\admin\index\LAdminPower;

class AdminPower extends AController implements IAdminPower
{
    private $logic;

    public function __construct()
    {
        parent::__construct();
        $this->logic = new LAdminPower();
    }


    public function index()
    {
        $data = $this->logic->index_data();
        $this->assign('list', $data);
        return view();
    }

    public function edit()
    {
        $id=input('id');
        $data=$this->logic->edit_index($id);
        $this->assign('data',$data);
        return view();

    }

    public function update()
    {
        $id=input('id');
       $param=array(
           'name'=>input('name')
       );
        return $this->logic->edit_name($id,$param);
    }

    public function index_data()
    {
        // TODO: Implement index_data() method.
    }

    public function import_power()
    {
        return action('System/create_menu1');
//        return $res;
    }
}